//
//  ShareMessageModel.swift
//  MMShareServiceDemo
//
//  Created by 吴传荣 on 2021/5/26.
//

import Foundation

public struct ShareMessageVoiceModel {
    /// 音频网页的URL地址
    var musicUrl = ""
    /// 音频数据的URL地址
    var musicDataUrl = ""
    
    public init(musicUrl: String = "", musicDataUrl: String = "") {
        self.musicUrl = musicUrl
        self.musicDataUrl = musicDataUrl
    }
    
}

public struct ShareMessageVideoModel {
    /// 视频链接
    var videoUrl = ""
    /// 供低带宽的环境下使用的视频链接
    var videoLowBandUrl = ""
    
    public init(videoUrl: String = "", videoLowBandUrl: String = "") {
        self.videoUrl = videoUrl
        self.videoLowBandUrl = videoLowBandUrl
    }
}

public struct ShareMessageModel {
    
    /// 标题 or 分享的纯文本
    var title: String = ""
    /// 描述内容
    var description: String = ""
    /// 分享的图片[缩略图]
    var shareImage: Any = ""
    
    /// 分享网页链接
    var webpageUrl: String = ""
    
    /// 分享类型
    var shareKind: ShareKindType = .text
    /// 分享场景type
    var shareSceneType: ShareSceneType = .WXSceneSession
    /// 分享小程序的版本
    var miniProgramType: ShareMiniProgramType = .release
    
    var shareVoiceModel: ShareMessageVoiceModel = ShareMessageVoiceModel()
    var shareVideoModel: ShareMessageVideoModel = ShareMessageVideoModel()

    public init(title: String = "",
                description: String = "",
                shareImage: Any = "",
                webpageUrl: String = "",
                shareKind: ShareKindType = .text,
                shareSceneType: ShareSceneType = .WXSceneSession,
                miniProgramType: ShareMiniProgramType = .release,
                shareVoiceModel: ShareMessageVoiceModel = ShareMessageVoiceModel(),
                shareVideoModel: ShareMessageVideoModel = ShareMessageVideoModel()) {
        
        self.title = title
        self.description = description
        self.shareImage = shareImage
        self.webpageUrl = webpageUrl
        self.shareKind = shareKind
        self.shareSceneType = shareSceneType
        self.miniProgramType = miniProgramType
        self.shareVoiceModel = shareVoiceModel
        self.shareVideoModel = shareVideoModel
    }
    
}
